package ch.ethz.eai.data;

import java.util.Date;

/**
 * Weather status at a given location (and at a given time).
 * <br>
 * If no time is specified upon creation, statuses are effective starting from the current moment.
 * @author zistvan
 *
 */
public class WeatherStatus {
	public static int STAT_UNDEFINED = -2;
	public static int STAT_UNKNOWN = -1;
	public static int STAT_CLEAR = 0;
	public static int STAT_CLOUDS = 1;
	public static int STAT_RAIN = 2;
	public static int STAT_STORM = 3;
	public static int STAT_SNOW = 4;
	
	private int status;
	private Location location;
	private Date reportedTime;
	
	public WeatherStatus(int status, Location location) {
		super();
		this.status = status;
		this.location = location;
		reportedTime = new Date();
	}

	public WeatherStatus(int status, Location location, Date time) {
		super();
		this.status = status;
		this.location = location;
		reportedTime = time;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Location getLocation() {
		return location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}

	public Date getReportedTime() {
		return reportedTime;
	}

	public void setReportedTime(Date reportedTime) {
		this.reportedTime = reportedTime;
	}
	
	@Override
	public String toString() {
		return "Weather:"+status+" "+location;
	}
	

}
